package main

import "fmt"

func BubbleSort(nums []int){
	length := len(nums)
	for i:=1;i<length;i++{
		for j:=0;j<length-1;j++{
			if nums[j]>nums[i] {
				nums[j],nums[i] = nums[i],nums[j]
			}
		}
	}

	fmt.Println(nums)
}
func my(nums []int)  {


	length:=len(nums)
	for i:=1;i<length ;i++  {
		for j:=0;j<length-1 ;j++  {
			if nums[j]>nums[i]{
				nums[j],nums[i]=nums[i],nums[j]
			}
		}
	}

	//length := len(nums)
	//for i:=1;i<length;i++{
	//	for j:=0;j<length-1;j++{
	//		if nums[j]>nums[i] {
	//			nums[j],nums[i] = nums[i],nums[j]
	//		}
	//	}
	//}
	fmt.Println(nums)
}

func main() {
	arr:=[]int{1,6,82,23,67,782,2,32}
	//BubbleSort(arr)
	my(arr)
//
}
